import { defineStore } from 'pinia';  
  
export const useUserInfoStore = defineStore('useInfo', {  
  state: () => ({  
    userName: '测试业主01',  
    userId: '01',  
    communityName: '樱雪名苑',  
    communityId: '01'  
  }),  
  actions: {  
    updateInfo(newInfo) {  
      // 使用对象解构赋值直接更新状态  
      this.$patch(newInfo);  
    }  
  }  
});